import axios from '../request';

export default {
  page: async (body) => {
    const res = await axios.post('/Api/Project/get_approve_list', body);
    return res.data;
  },
  getApprovalData: async (client_id) => {
    const res = await axios.post('/Api/Project/get_approve_data', { client_id });
    return res.data;
  },
  doApproval: async (list_id, status) => {
    const res = await axios.post('/Api/Project/approve', { list_id, status }, {
      headers: {
        'Content-Type': 'application/json',
      }
    });
    return res.data;
  },
  doBatchApproval: async (lists, status) => {
    const res = await axios.post('/Api/Project/approve', { lists, status }, {
      headers: {
        'Content-Type': 'application/json',
      }
    });
    return res.data;
  },
  confirm: async (listId) => {
    const res = await axios.post('/Api/Project/confirm', { list_id: listId }, {
      headers: {
        'Content-Type': 'application/json',
      }
    });
    return res.data;
  }
};
